<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="/iuie-tag"%>
<%@ taglib prefix="sys" uri="/sys-tag" %>
<%@ taglib prefix="lui" tagdir="/WEB-INF/tags" %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>博客平台</title>
<lui:context/>
</head>
<u:View basePath="/res-datum/blog" userJS="blog" userCSS="blog" delayLoadJs="false">
<body style="overflow-y:auto">
	<!-- 左侧菜单栏 -->
	<aside class='left-aside'>
		<div class="m-form" data-part='search'>
			<!-- 搜索下面ul中的菜单 -->
			<input type="text" name='originalName' placeholder="搜索博客类型" id='searchBlogType' data-type='search'><i 
				class='fa fa-search'></i><i class='fa fa-pencil' title='编辑博客类型' onclick="BlogPage.openEditBlogTypeDialog()"></i>
		</div>
		<lui:ajax url="${ctx }/sys/code/findCodeInfoByTypeId" id="findBlogCategoryAjax" data="{'codeTypeId':'blogType','state':1}" 
            contentType="application/x-www-form-urlencoded" onSuccess="BlogPage.findCategorySucc" autoSend="true"/>
        <lui:ajax url="${ctx }/datum/blog/delete" id="deleteBlogByIdAjax" onSuccess="BlogPage.deleteBlogSucc"/>
        <lui:ajax url="${ctx }/datum/blog/article" id="findBlogByCategoryAjax" onSuccess="BlogPage.findBlogByCategorySucc"/>
		<div id="categoryMenu"></div>
		<%-- <div data-part='menu'>
		<ul>
			<!-- blogType：从码表中查询 -->
			<c:forEach var="item" items="${blogTypes }"  varStatus="status">
				<li><a href="javascript:void(0);" data-value="${item.codeInfoValue }" data-text='${item.codeInfoName}'><c:out value="${item.codeInfoName}"></c:out></a></li>
			</c:forEach>
		</ul>
		</div> --%>
	</aside>
	<!-- 内容主体 -->
	<article class="t-main">
		<!-- 操作搜索栏 -->
		<section class='t-oper-bar'>
			<div class="m-form t-uploader">
				<button class="m-btn m-primary" onclick="BlogPage.uploadArticle()">上传文章</button>
			</div>
			<div class="m-form t-search">
				<!-- 搜索下面ul中的菜单 -->
				<input type="text" name='article' autofocus="autofocus" placeholder="搜索文章" data-type='search' id='searchArticle'><i 
					class='fa fa-search'></i>
				<button class="m-btn m-primary" onclick="BlogPage.searchBlog()">搜索</button>
				<lui:ajax url="${ctx }/datum/blog/search" id="searchBlogAjax" type="post" 
    		        onSuccess=""/>
			</div>
		</section>
		<!-- 文章列表 -->
		<section class="t-article-list">
		</section>
	</article>
	<lui:ajax url="${ctx }/datum/blog/signRead" id="signReadAjax" onSuccess="BlogPage.refreshReadCount" silent="true"/>
</body>
</u:View>
</html>